import { data } from "./FormConfig";

export default {
  tag: "el-container",
  config: {
    style: {
      width: "100%",
    },
  },
  children: [
    {
      tag: "el-header",
      config: {
        props: {},
        style: {},
      },
      children: [
        {
          tag: "div",
          config: {},
          children: ["el-header ${title}"],
        },
        {
          tag: "div",
          config: {},
          children: ["${admin}"],
        },
      ],
      data: {
        title: "标题",
        admin: "docctest",
      },
    },
    {
      tag: "el-main",
      config: {
        props: {},
        style: {},
      },
      children: [
        {
          tag: "aegle-form",
          config: {
            props: {
              config: data,
              formId: "9",
            },
          },
        },
        {
          tag: "aegle-dialog",
          config: {
            props: {
              myProp: "bar",
            },
            ref: "dialog",
          },
          children: [
            {
              tag: "aegle-form",
              config: {
                props: {
                  config: data,
                  formId: "9",
                },
                slot: "default",
              },
            },
          ],
        },
        {
          tag: "el-button",
          children: ["打开dialog"],
          config: {},
          events: [
            {
              eventName: "click",
              executor: {
                name: ["component", "openForm"],
                params: {
                  targetRef: "dialog",
                  formId: "9",
                },
              },
            },
          ],
        },
      ],
    },
  ],
};
